#pragma once

#include <thread>
#include <nlohmann/json.hpp>
#include <string>
#include <functional>
#include <memory>
#include "LRUCache.h"

// using ThreadPtr = std::shared_ptr<std::thread>;
class ThreadPool;

struct MyThread
{
    MyThread(int id, int capacity, ThreadPool* tp);

    int id;
    std::thread th;
    LRUCache<std::string, nlohmann::json> cache;
    LRUCache<std::string, nlohmann::json> patch;
    ThreadPool* pool;
};